local huiwubang_skill = fk.CreateSkill {

  name = "#huiwubang_skill",
  attached_equip = "huiwubang",

  tags = {  },

}



huiwubang_skill:addEffect(fk.DamageCaused, {
  name = "#huiwubang_skill",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(huiwubang_skill.name) and (not data.chain) and
        data.card and data.card.trueName == "slash" and #data.to:getCardIds("hej") >= 2
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:broadcastPlaySound(Thbattle_path .. "audio/card/male/huiwubang")
    local to = data.to
    for i = 1, 2 do
      if player.dead or to.dead or #data.to:getCardIds("hej") == 0 then break end
      local card = room:askForCardChosen(player, to, "hej", huiwubang_skill.name)
      room:throwCard({ card }, huiwubang_skill.name, to, player)
    end
    data:preventDamage()
  end
})

return huiwubang_skill